<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="description" content="{{navSub.cate.seo_description}}">
    <meta name="keywords" content="{{navSub.cate.seo_keywords}}" />
    <meta property="og:title" content="{{navSub.cate.seo_title}}" />
    <meta property="og:description" content="{{site.description}}" />
    <title>{{navSub.cate.seo_title}}-{{site.name}}</title>
    {{include './common/meta.html'}}

<body class="bg-f8f8f8">
    <!-- 头部 -->
    {{include './common/header.html'}}

    <!-- 头条文章 -->
    <main class="bg-f2f2f2 pt-10 pb-20 row">
        <div class="main center mt-10 row gap-20">
            <!-- 最新文章 -->
            <article class="article-index">
                <div class="bg-fff pd-15 mb-1 f-14 c-999 radius-6">
                    <i class="ico-20 ico-home pos-r t-3"></i>
                    <a href="/">首页</a> /
                    {{each position}}
                        {{if $index < position.length-1}}
                            <a href="{{$value.path}}/index.html">{{$value.name}}</a> /
                            {{else}}
                            <a class="c-666" href="{{$value.path}}/index.html">{{$value.name}}</a>
                        {{/if}}
                    {{/each}}
                </div>

                <div class="bg-fff pl-25 pr-25 pb-25 radius-6 list">
                    {{if data.list.length>0}}
                    <ul>
                        {{each data.list}}
                        <li class="row border-dashed pt-20 pb-20">
                            <figure class="row justify-between mt-10 ">
                                {{if $value.img}}
                                <div class="thumb-120 mb-10">
                                    <img class="w-p100" src="{{$value.img}}" alt="{{$value.title}}"
                                        title="{{$value.title}}">
                                </div>
                                {{/if}}
                                <div class="flex-1">
                                    <h3 class="f-18 ellips-2 bold mt-4 c-141414">
                                        <a href="{{$value.path}}/article-{{$value.id}}.html"
                                            title="{{$value.title}}">{{$value.title}}</a>
                                    </h3>
                                    <p class="f-12 c-bfbfbf mb-8">
                                        <i class="ico-20 ico-time pos-r t-4"></i> {{$value.createdAt}}
                                        <i class="ico-20 ico-admin pos-r t-4 ml-4"></i> {{$value.author ||'admin'}}
                                        <i class="ico-20 ico-view pos-r t-5 ml-4"></i> 阅读（{{$value.pv}}）
                                        <!-- <i class="ico-20 ico-zan pos-r t-4 ml-4"></i>点赞（95） -->
                                    </p>
                                    <p class="f-14 ellips-3 c-595959">
                                        <a href="{{$value.path}}/article-{{$value.id}}.html" title="{{$value.title}}">
                                            {{@ $value.description}}[详情]</a>
                                    </p>
                                </div>
                            </figure>
                        </li>
                        {{/each}}
                    </ul>
                    {{else}}
                    <div class="el-empty">
                        <div class="mt-35 mb-35 f-30">
                            <p>寻他千百度，</p>
                            <p>文章一点无！</p>
                        </div>
                        <div class="el-empty__description">
                            <p>禅悦-语录</p>
                        </div>
                    </div>
                    {{/if}}
                </div>

                <!-- 分页 -->
                <div class="page mt-1 bg-fff pd-25 row justify-center  radius-6" id="app">
                     <ul class="overflow-h center" id="page">
                       {{@ pageHtml}}
                     </ul> 
                </div>

            </article>

            <aside class="flex-1">
                <!-- HOT -->
                <section class="notices pd-20 mb-20 bg-fff">
                    <h3 class="m-title border-dashed f-16 row justify-between">
                        {{navSub.cate.name}}<span class="more">more</span>
                    </h3>
                    <ul class="mt-10">
                        {{each hot}}
                        <li class="f-14 pt-4 pb-4 row justify-between">
                            <a href="{{$value.path}}/article-{{$value.id}}.html" title="{{$value.title}}">
                                {{$value.title}}
                            </a>
                        </li>
                        {{/each}}
                    </ul>
                </section>

                <!-- 栏目 -->
                <section class="notices pd-20 mb-20 bg-fff">
                    <h3 class="m-title border-dashed f-16 row justify-between">相关栏目</h3>
                    <p class="mt-10">
                        {{each navSub.cate.children}}
                        <a class="el-tag mr-5 mb-5" href="/">{{$value.name}}</a>
                        {{/each}}
                    </p>
                </section>

                <!-- 图文 推荐 -->
                <section class="notices pd-20 mb-20 bg-fff">
                    <h3 class="m-title border-dashed f-16 row justify-between">推荐图文</h3>
                    {{each recommend}}
                    <figure class="row justify-between mt-10 ">
                        {{if $value.img}}
                        <div class="thumb mb-10">
                            <img class="w-p100" src="{{$value.img}}" alt="{{$value.title}}" title="{{$value.title}}">
                        </div>
                        {{/if}}
                        <div class="flex-1">
                            <figcaption class="f-18 ellips-2 bold mt-4">{{$value.title}}</figcaption>
                            <p class="f-14  pd-15">
                                {{@ $value.description}}
                                <a href="{{$value.path}}/article-{{$value.id}}.html" title="{{$value.title}}">详情
                                </a>
                            </p>
                        </div>
                    </figure>
                    {{/each}}
                </section>

                <!-- 广告 -->
                {{if frag.ad}}
                <section class="ad mb-20 bg-fff">
                    {{@ frag.ad}}
                </section>
                {{/if}}

                <!-- tag标签 -->
                <section class="notices pd-20 mb-20 bg-fff">
                    <h3 class="m-title border-dashed f-16 row justify-between">tag标签</h3>
                    <p class="mt-10">
                        {{each tag}}
                        <a class="el-tag mr-5 mb-5" href="/tags/{{$value.name}}.html"
                            title="{{$value.name}}">{{$value.name}}</a>
                        {{/each}}
                    </p>
                </section>
            </aside>
        </div>
    </main>

    <!-- footer -->
    {{include './common/footer.html'}}

    <!-- 移动端导航 -->
    {{include './common/wap-nav.html'}}

    <div class="api ignore mb-20 mt-20 pd-20 bg-f2f2f2">
        <h1>接口页面--全局数据：</h1>
        <p class="mb-20">site-> {{site}} </p>
        <p class="mb-20">111-->{{site.json.siteSubtitle}}</p>
        <p class="mb-20">nav-> {{nav}} </p>
        <p class="mb-20">category-> {{category}}</p>
        <p class="mb-20">friendlink-> {{friendlink}}</p>
        <p class="mb-20">base_url-> {{base_url}}</p>
        <p class="mb-20">frag--->{{frag}}</p>
        <p class="mb-20">ad--->{{frag.ad}}</p>
        <p class="mb-20">tag--->{{tag}}</p>

        <p class="mb-20">-----------</p>
        <p class="mb-20">position------>{{position}}</p>
        <p class="mb-20">navSub------>{{navSub}}</p>
        <p class="mb-20">list------>{{data}}</p>
        <p class="mb-20">recommend------>{{recommend}}</p>
        <p class="mb-20">hot------>{{hot}}</p>
        <p class="mb-20">imgs------>{{imgs}}</p>

    </div>

    {{include './common/js.html'}}

    <!-- <script>
        var app = Vue.createApp({
            data: function () {
                return {
                    drawer: false,
                    current: 1,
                    total: parseInt('{{data.count}}')
                }
            },
            created() {
                var regex = /(\d+)/;
                var matches = location.pathname.match(regex);
                var number = matches && matches.length > 0 ? parseInt(matches[0]) : null;
                this.current = number
            },
            mounted() {
                let _this = this;
                document.querySelector('.ico-open').addEventListener('click', () => {
                    _this.drawer = true
                })
            },
            methods: {
                handleCurrentChange(v) {
                    var url = location.pathname;
                    var match = url.match(/(\d+)/); // 提取数字部分
                    if (match && match.length > 0) {
                        var number = parseInt(match[0]);
                        var newURL = url.replace(match[0], v);
                        location.href = newURL;
                    } else {
                        var newURL = url.replace("index", "index" + v);
                        location.href = newURL;
                    }
                },
                handleClose() {
                    this.drawer = false
                }
            }
        });
        app.use(ElementPlus);
        app.mount('#app');
    </script> -->
</body>

</html>